/// @tags: MinMaxExclusion FWT
#include <cstdio>
#include <iomanip>
#include <iostream>
#define rint register int

using std::cin;
using std::cout;

namespace BlueQuantum {

constexpr int maxn = 20;

double p[1 << maxn];
int popcnt[1 << maxn];

inline int main() {
  int n;
  cin >> n;
  int maxl = 1 << n;
  for (int i = 0; i < maxl; ++i) {
    cin >> p[i];
  }
  for (int i = 2; i <= maxl; i <<= 1) {
    int mid = i >> 1;
    for (int j = 0; j < maxl; j += i)
      for (int k = j; k < j + mid; ++k) p[k + mid] += p[k];
  }
  for (int i = 1; i < maxl; ++i) {
    popcnt[i] += popcnt[i >> 1] + (i & 1);
  }
  double ans = 0;
  for (int i = 1; i < maxl; ++i) {
    if (1 - p[(maxl - 1) ^ i] < 1e-8) {
      cout << "INF\n";
      return 0;
    }
    double ex = 1 / (1 - p[(maxl - 1) ^ i]);
    popcnt[i]& 1 ? ans += ex : ans -= ex;
  }
  cout << std::fixed << std::setprecision(7) << ans;
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("P3175 [HAOI2015] 按位或.in", "r", stdin);
  freopen("P3175 [HAOI2015] 按位或.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
